oopLib = {}
oopLib.functions = {}

function oopLib.functions.newIni ( klasse, ... )

	local instanz = setmetatable ( {}, {__index = klasse} )
	
	if rawget(klasse,'constructor') then
		rawget(klasse,'constructor')(instanz,...)
	end
	
	return instanz
end

function oopLib.functions.bind(func, self)
	return function(...) return func(self, ...) end 
end

function oopLib.functions.delete ( instanz,... )
	if instanz.decon then
		instanz:decon (...)
	end
end

table.foreach ( oopLib.functions,
	function ( key, value )
		_G[key] = value
	end
)

local screen = {guiGetScreenSize()}
-- // Usefull
function isMouveOverPosition ( x, y, w, h)
	if isCursorShowing () then
		local mouse = {getCursorPosition()}
		local cursorx,cursory = mouse[1]*screen[1], mouse[2]*screen[2]
		
		if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
			return true
		else
			return false
		end
	end	
end
function GetAbsoluteCursorPosition ()
        if isCursorShowing() then
                local cx,cy = getCursorPosition()
                return cx*screen[1],cy*screen[2]
        end
        return 0,0
end
